package cultu.customer.service;

import org.granite.messaging.service.annotations.RemoteDestination;

import cultu.core.message.Context;
import cultu.customer.message.Order;
import cultu.customer.message.OrderCriteria;
import cultu.customer.message.OrderList;
import cultu.customer.message.OrderScenario;

/**
 * The Interface OfferManager.
 */
@RemoteDestination(id="orderManager", channel="my-amf")
public interface OrderManager {

  /**
   * Get offer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pKey the key.
   * @return the offer
   */
  Order getOrder (Context pContext, OrderScenario pScenario, Order pKey);

  /**
   * Create the offer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pOffer the offer.
   * @return the offer
   */
  Order createOrder (Context pContext, OrderScenario pScenario, Order pOffer);

  /**
   * Delete the offer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pKey the key.
   * @return the offer
   */
  Order deleteOrder (Context pContext, OrderScenario pScenario, Order pKey);

  /**
   * Updates the offer.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pOffer the offer.
   * @return the offer
   */
  Order updateOrder (Context pContext, OrderScenario pScenario, Order pOffer);

  /**
   * Find the offers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pCriteria the criteria.
   * @return the offer list
   */
  OrderList findOrders (Context pContext, OrderScenario pScenario, OrderCriteria pCriteria);

  /**
   * Delete the offers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pList the offer list.
   * @return the offer list
   */
  OrderList deleteOrders (Context pContext, OrderScenario pScenario, OrderList pList);

  /**
   * Create offers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pList the offer list.
   * @return the offer list
   */
  OrderList createOrders (Context pContext, OrderScenario pScenario, OrderList pList);

  /**
   * Updates offers.
   *
   * @param pContext the context.
   * @param pScenario the scenario.
   * @param pList the offer list.
   * @return the offer list
   */
  OrderList updateOrders (Context pContext, OrderScenario pScenario, OrderList pList);
}
